<!--
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2023-11-17 11:36:45
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2023-12-05 13:12:05
 * @FilePath: /hgpt-admin/src/pages/PackageSet/index.vue
 * @Description: 文件介绍
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
-->
<template>
  <div class="Package_content">
    <div class="action_btn">
      <el-button type="primary" @click="add">添 加</el-button>
      <el-button type="primary" @click="del">删 除</el-button>
      <el-button @click="grounding">上 架</el-button>
      <el-button @click="offShelf">下 架</el-button>
    </div>
    <div>
      <el-table
        ref="multipleTable"
        :data="tableData"
        tooltip-effect="dark"
        style="width: 100%"
        border
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column prop="name" label="名称"> </el-table-column>
        <el-table-column prop="name" label="机器"></el-table-column>
        <el-table-column prop="sj" label="是否上架">
          <template slot-scope="scope">
            <el-switch
              v-model="scope.row.sj"
              :active-value="1"
              :inactive-value="0"
            >
            </el-switch>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="操作">
          <template slot-scope="scope">
            <el-button type="text" @click="edit(scope.row)">修改</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>

export default {
  data () {
    return {
      tableData: [
        {
          name: "李xx",
          sj: 1
        },
        {
          name: "李xx",
          sj: 0
        },
        {
          name: "李xx",
          sj: 1
        },
        {
          name: "李xx",
          sj: 0
        },
      ],
    }
  },
  components: {

  },
  mounted () {

  },
  methods: {
    // 添加
    add () { },
    // 删除
    del () { },
    // 上架
    grounding () { },
    // 下架
    offShelf () { },
    // 选择
    handleSelectionChange (v) {
      console.log(v)
    },
    // 修改
    edit (v) {
      console.log(v)
    },
  }
}
</script>

<style lang="scss" scoped>
.Package_content {
  padding: 20px;
  .action_btn {
    padding-bottom: 10px;
  }
}
</style>>


